<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Velin Georgiev Blog - Web applications developement, ASP.NET, SharePoint, Python, SQL</title>
{% if post_id %}
<meta name="description" content="{{post_id.title|safe}}">
{% else %}
<meta name="description" content="Velin's blog contains topics related to web applications developement, agile developement, new technologies, workarounds and tutorials based on ASP.NET, Python, SharePoint, MVC, SQL, T-SQL">
{% endif %}
<link type="text/css" rel="stylesheet" href="/stylesheets/main-grey.css" />
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAALaBYjHTT3MscB32QQ5om3hS3YBVzhUhNvM0yrSz-CK8h7wVqSBQsqNXabK-ORWN2cIAsZB9x3no9eQ"></script>
<script type="text/javascript" src="../js/custom.js" ></script>
<link href="../js/google-code-prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/google-code-prettify/prettify.js"></script>
<!-- Adding social buttons js -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
<!-- Adding social buttons js -->
<script type="text/javascript">
	google.load("jquery", "1.6.4");
	google.load("jqueryui", "1.8.16");    

	function OnLoad(){
		var cat = getParameter('cat');
		var cat_list = document.getElementById('cat');
		if (cat){
			for (i=0; i<cat_list.options.length; i++)
			{
				if (cat_list.options[i].text == cat.replace("+"," ")) {
					document.getElementById('cat').options.selectedIndex = i;
				}
			}
		}
		prettyPrint();
	}
	
	function validateComment(){
		//Some epic client validation
		if($('#comment').val()){
			$('#new_comment').submit()
		}else{
			alert('Please add some content in the comment field before you hit the "Leave a comment" button.');
		}
	}
	google.setOnLoadCallback(OnLoad);
</script>
</head>
<body>
{% include "header.html" %}
<noscript>JavaScript Disabled. Please enable JavaScript!</noscript>
<table id="main" class="content-place-holder" >
	<tr>
		<td id="column_1" class="left-place-holder" >
			<div class="menu-place-holder" >
				<a href="/" >Home</a><br/>
				<a href="/about" >About</a>
			</div>
			<form action="/" id="posts_list" method="get" >
				<div class="menu-place-holder" >
				<br/><span class="label-tag">Categories</span><br/><br/>
					<select id="cat" name="cat" class="menu-dropdown" onchange="$('#posts_list').submit();" >
						<option selected>All</option>
						{% for item in categories %}
							<option>{{item}}</option>
						{% endfor %}
					</select>
				</div>
				<div id="div_links" class="menu-place-holder" >
				<span class="label-tag">Article Titles</span>
				|<span class="label-tag-small">
					<button type="button" id="btnExtendMenu" name="btnExtendMenu" class="menu-button" accesskey="T" onclick="$('.right-place-holder').toggle();" ><u>T</u>oggle</button>
				</span>
				<br/><br/>
					{{titles_list|safe}}
				</div>
			</form>		
			<br/>
		{% if post_id %}	
		</td>
		<td id="column_2" class="right-place-holder" >
			<div id="div_title">
				<div class="label-tag-small"> 
				<button type="button" id="btnExtendReader" name="btnExtendReader" class="menu-button" accesskey="O" onclick="$('.left-place-holder').toggle();" >T<u>o</u>ggle</button> | Article ID: {{ article_id }} | Category: {{ post_id.category }} | Modified by: {{ post_id.modified_by }}</div><br/>
				<span class="label-tag">Title:</span> {{ post_id.title|safe }}
			</div><br/>
			<span class="label-tag">Content:</span>
			<div id="div_reader" class="post-place-holder" >
				{{ post_id.content|safe }}
				{% include "social_buttons.html" %}
			</div><br/>
			<div id="div_comments">
			<span class="label-tag">Comments:</span><br/><br/>
			{% for comment in comments_list %}
					<div class="label-tag-small">
						[{{comment.date.date}}] <strong>{{ comment.author.nickname }}</strong>:
					</div>
					<div class="post-place-holder" >
					{% if user.nickname == comment.author.nickname %}
						<div class="user-comment-button">
							<a href="/del?id={{post_id.key.id}}&amp;comment_id={{comment.key.id}}" >[Remove]</a>
						</div>
					{% endif %}
					{{ comment.comment|safe|urlize|linebreaksbr }}
					</div><br/>
			{% endfor %}
			</div>
			{% if user %}
				<form action="/new_comment" id="new_comment" method="post" >
					<textarea id="comment" name="comment" class="comment-box" ></textarea><br/>
					<span class="label-tag-small">Please note all HTML tags would be escaped, to post a link just type the full path of it. Example: http://www.google.com/. <br/>You may want to use BBCode tags as [b][/b],[i][/i],[u][/u],[quote][/quote],[img][/img],[code][/code].</span><br/>
					<button type="button" id="btnComment" class="comment-button" accesskey="C" onclick="validateComment();" />Leave a <u>c</u>omment</button>
					<input type="hidden" name="post_id" id="post_id" value="{{ article_id }}" />
					<input type="hidden" name="cat_" id="cat_" value="" />
				</form>	
			{% else %}
				<div id="sign_in">
					Post Feedback<br/>You have to [<a href="{{ login|safe|fix_ampersands }}"><strong>sign in</strong></a>]
				</div>
			{% endif %}
		</td>
		{% else %}
		<td id="column_2" class="right-place-holder">
			<div id="home">
				<br/><br/><br/><br/>
				Welcome,<br/><br/> 
				
				This is my personal blog. You can find the newest posts on the left menu panel.<br/>
				This blog contains topics mainly related to applications developement, agile developement, new technologies, workarounds and tutorials related to various projects based on various technologies (ASP.NET, SharePoint, Python, Jython etc.). From time to time there might be some social events posted as well :)<br/><br/>

				The blog is still under developement so there will be layout changes soon.<br/><br/>
				
				You may want to subscribe to the feeds channel: http://velin-georgiev-blog.appspot.com/feed<br/><br/>
				Cheers,<br/> 
				Velin<br/><br/>
				{% include "social_buttons.html" %}
			</div>
		</td>
		{% endif %}
	</tr>
</table>
{% include "footer.html" %}
</body>
</html>